#!/bin/bash
#========================================================================
# Author: YSLin
# Email: 
# File Name: removeSpaceDir.sh
# Description: 
#   Shell Script to remove spaces in directory
# Edit History: 
#   2011-02-16    File created.
#========================================================================

mkdir "a b c";

for dir in ./*/; 
do
	echo $dir
	case "$dir" in
		*" "* )  
			echo mv "$dir" "${dir// /_}";
			mv "$dir" "${dir// /_}" #將有空白的目錄的空白都改成底線
			;;
	esac
done
